// Copyright (c) 2025, yuxinyong and contributors
// For license information, please see license.txt

frappe.ui.form.on("Cost Break Down", {
    onload(frm){
        if (!frm.doc.drawing_file) {
            frm.get_field("preview_html").$wrapper.html('');
        }
    },
	refresh(frm) {
        if (frm.doc.drawing_file) {
            frm.set_df_property("preview_html", "hidden", 0);
			zelin_shoe_biz.utils.preview_file(frm);
        }
	}
});
